package com.kylefu.design.pattern.builder;

public class BuilderExample {

  public static void main(String[] args) {
    CardBuilder cardBuilder = new CardBuilder();
    Director director = new Director();
    director.setBuilder(cardBuilder);
    director.construct();
    System.out.println(director.getProduct());

    BookBuilder bookBuilder = new BookBuilder();
    director.setBuilder(bookBuilder);
    director.construct();
    System.out.println(director.getProduct());

    Product product = Builder2.builder()
        .buildName("testName")
        .buildColor("testColor")
        .buildSize(3).build();
    System.out.println(product);
  }
}
